package cn.com.yang.datastruct.graph;

/**
 * 
 * TODO
 * @author yangyijin
 * @since 2024年2月7日-上午11:22:24
 */
public class GraphMain {
    public static void main(String[] args) {
        Graph graph = new Graph();
        graph.insert('A');//0
        graph.insert('B');//1
        graph.insert('C');//2
        graph.insert('D');//3
        graph.insert('E');//4
        graph.insert('F');//5
        graph.addEdge(0,1);
        graph.addEdge(1,2);
        graph.addEdge(0,3);
        graph.addEdge(0,4);
        graph.addEdge(4,5);
        graph.depthFirstSearch();
        graph.breadthFirstSearch();
    }
}
